<?php

namespace app\admin\model;
use think\model\relation\BelongsTo;
use think\Model;

/**
 * Shop
 */
class Shop extends Model
{
    // 表主键
    protected $pk = 'sid';

    // 表名
    protected $name = 'shop';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 字段类型转换
    protected $type = [
        'kai_time' => 'timestamp:Y-m-d H:i:s',
        'end_time' => 'timestamp:Y-m-d H:i:s',
    ];


    public function admin(): BelongsTo
    {
        return $this->belongsTo(Admin::class, 'admin_id');
    }


}